diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-14 20:59:01 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-14 20:59:01 +0200 |
commit | 853d29a0f12cdcb6c406b829a57439c7ea9b570d (patch) | |
tree | 047d94a11037617521c7a50130a6ead538c5daf7 /module/gui | |
parent | fixed config on webif + show description (diff) | |
download | pyload-853d29a0f12cdcb6c406b829a57439c7ea9b570d.tar.xz |
has_key refractored, package name generator by Geek
Diffstat (limited to 'module/gui')
-rw-r--r-- | module/gui/CNLServer.py | 4 | ||||
-rw-r--r-- | module/gui/SettingsWidget.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/module/gui/CNLServer.py b/module/gui/CNLServer.py index 1c654c54e..5ecac8277 100644 --- a/module/gui/CNLServer.py +++ b/module/gui/CNLServer.py @@ -75,7 +75,7 @@ class CNLHandler(BaseHTTPRequestHandler): print "queue", queue def get_post(self, name, default=""): - if self.post.has_key(name): + if name in self.post: return self.post[name] else: return default @@ -223,4 +223,4 @@ if __name__ == "__main__": except KeyboardInterrupt: s.stop = True s.stopped = True - print "quiting.."
\ No newline at end of file + print "quiting.." diff --git a/module/gui/SettingsWidget.py b/module/gui/SettingsWidget.py index 8123fe139..0f8a9c88e 100644 --- a/module/gui/SettingsWidget.py +++ b/module/gui/SettingsWidget.py @@ -107,10 +107,10 @@ class SettingsWidget(QWidget): def reloadSection(self, sections, pdata): for k, section in enumerate(pdata): - if sections.has_key(k): + if k in sections: widget = sections[k] for item in section.items: - if widget.inputs.has_key(item.name): + if item.name in widget.inputs: i = widget.inputs[item.name] if item.type == "int": @@ -136,10 +136,10 @@ class SettingsWidget(QWidget): def saveSection(self, sections, pdata, sec="core"): for k, section in enumerate(pdata): - if sections.has_key(k): + if k in sections: widget = sections[k] for item in section.items: - if widget.inputs.has_key(item.name): + if item.name in widget.inputs: i = widget.inputs[item.name] if item.type == "int": |