summaryrefslogtreecommitdiffstats
path: root/pyload/utils/pylgettext.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-17 01:07:33 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-17 01:07:33 +0200
commit730b160e28d711fad96e6a61070e374ad0966566 (patch)
treefe3f8cf4161de8f93cddf29ea49464b493083e2b /pyload/utils/pylgettext.py
parentSpare code cosmetics (1) (diff)
downloadpyload-730b160e28d711fad96e6a61070e374ad0966566.tar.xz
Spare code cosmetics (2)
Diffstat (limited to 'pyload/utils/pylgettext.py')
-rw-r--r--pyload/utils/pylgettext.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/pyload/utils/pylgettext.py b/pyload/utils/pylgettext.py
index 0e3ebad80..1f31cf42d 100644
--- a/pyload/utils/pylgettext.py
+++ b/pyload/utils/pylgettext.py
@@ -6,12 +6,10 @@ _searchdirs = None
origfind = find
+
def setpaths(pathlist):
global _searchdirs
- if isinstance(pathlist, list):
- _searchdirs = pathlist
- else:
- _searchdirs = list(pathlist)
+ _searchdirs = pathlist if isinstance(pathlist, list) else list(pathlist)
def addpath(path):
@@ -32,8 +30,7 @@ def delpath(path):
def clearpath():
global _searchdirs
- if _searchdirs is not None:
- _searchdirs = None
+ _searchdirs = None
def find(domain, localedir=None, languages=None, all=False):
@@ -51,8 +48,7 @@ def find(domain, localedir=None, languages=None, all=False):
results = filter(lambda x: x is not None, results)
if len(results) == 0:
return None
- else:
- return results[0]
+ return results[0]
else:
return results