summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-08-03 16:41:51 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-08-03 16:41:51 +0200
commit96625de220eb157631aabcc54e1a51e9bb39a4d2 (patch)
tree4a88e619873731556e1948ec0ccf61ba32fab8df
parentContainer updated to new interface (diff)
downloadpyload-96625de220eb157631aabcc54e1a51e9bb39a4d2.tar.xz
fix
-rw-r--r--module/ConfigParser.py16
-rw-r--r--module/plugins/Container.py4
2 files changed, 11 insertions, 9 deletions
diff --git a/module/ConfigParser.py b/module/ConfigParser.py
index b9b46176b..e3d1e038e 100644
--- a/module/ConfigParser.py
+++ b/module/ConfigParser.py
@@ -126,7 +126,7 @@ class ConfigParser:
if not listmode:
conf[section][option] = { "desc" : desc,
- "typ" : typ,
+ "type" : typ,
"value" : value}
@@ -154,7 +154,7 @@ class ConfigParser:
if not listmode:
conf[section][option] = { "desc" : desc,
- "typ" : typ,
+ "type" : typ,
"value" : value}
except:
@@ -208,7 +208,7 @@ class ConfigParser:
else:
value = str(data["value"]) + "\n"
- f.write('\t%s %s : "%s" = %s' % (data["typ"], option, data["desc"], value) )
+ f.write('\t%s %s : "%s" = %s' % (data["type"], option, data["desc"], value) )
#----------------------------------------------------------------------
def cast(self, typ, value):
"""cast value to given format"""
@@ -225,13 +225,13 @@ class ConfigParser:
self.config["remote"]["username"] = {
"desc" : "Username",
- "typ": "str",
+ "type": "str",
"value": self.username
}
self.config["remote"]["password"] = {
"desc" : "Password",
- "typ": "str",
+ "type": "str",
"value": self.password
}
@@ -277,14 +277,14 @@ class ConfigParser:
self.plugin[config[0]] = { "desc" : config[0],
config[1] : {
"desc" : config[3],
- "typ" : config[2],
+ "type" : config[2],
"value" : self.cast(config[2], config[4])
} }
else:
if not self.plugin[config[0]].has_key(config[1]):
self.plugin[config[0]][config[1]] = {
"desc" : config[3],
- "typ" : config[2],
+ "type" : config[2],
"value" : self.cast(config[2], config[4])
}
@@ -325,4 +325,4 @@ if __name__ == "__main__":
pprint(c.config)
- c.saveConfig(c.config, "user.conf") \ No newline at end of file
+ c.saveConfig(c.config, "user.conf")
diff --git a/module/plugins/Container.py b/module/plugins/Container.py
index 9f0b28884..9795ec98a 100644
--- a/module/plugins/Container.py
+++ b/module/plugins/Container.py
@@ -21,6 +21,8 @@
from module.plugins.Crypter import Crypter
+from os.path import join, exists, basename
+
class Container(Crypter):
__name__ = "Container"
__version__ = "0.1"
@@ -71,4 +73,4 @@ class Container(Crypter):
if self.pyfile.name.startswith("tmp_"):
os.remove(self.pyfile.url)
- \ No newline at end of file
+