Commits

ranan committed 6999f16

folder fix

Comments (0)

Files changed (2)

module/PluginThread.py

             for key, value in frame.f_locals.items():
                 dump += "\t%20s = " % key
                 try:
-                    if hasattr(value, "__iter__"):
-                        dump += pformat(value) + ":" + pformat(list(value))
-                    else:
-                        dump += pformat(value) + "\n"
+                    dump += pformat(value) + "\n"
                 except:
                     dump += "<ERROR WHILE PRINTING VALUE>\n"
                                    

module/plugins/Crypter.py

     #----------------------------------------------------------------------
     def createPackages(self):
         """ create new packages from self.packages """
-        i = 0
-        for pack in self.packages:
+        for i, pack in enumerate(self.packages):
 
             self.log.info(_("Parsed package %s with %s links") % (pack[0], len(pack[1]) ) )
             
             if i == 0:
                 # replace current package with new one
                 self.pyfile.package().name = pack[0]
-                self.pyfile.package().folder = pack[2]
+                self.pyfile.package().folder = pack[2] if self.core.config["general"]["folder_per_package"] else ""
                 self.pyfile.package().notifyChange()
                 
                 self.core.files.addLinks(pack[1], self.pyfile.package().id)
             else:
                 self.core.server_methods.add_package(pack[0], pack[1])
             
-            i += 1
-