aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <p@rdus.de>2008-11-14 20:42:35 +0000
committerGunnar Wrobel <p@rdus.de>2008-11-14 20:42:35 +0000
commitd9e7593ee3e400ef784939b6ba9e195ebcd77c72 (patch)
treecc9f72b03b20a442c8617184bbec57896cf10e63
parentDo not remove directories if adding an (diff)
downloadoverlord-d9e7593ee3e400ef784939b6ba9e195ebcd77c72.tar.gz
overlord-d9e7593ee3e400ef784939b6ba9e195ebcd77c72.tar.bz2
overlord-d9e7593ee3e400ef784939b6ba9e195ebcd77c72.zip
layman-1.2.0-r1, TR locale error (#235165)
http://bugs.gentoo.org/show_bug.cgi?id=235165
-rw-r--r--ChangeLog7
-rw-r--r--layman/action.py12
-rw-r--r--layman/overlays/overlay.py5
3 files changed, 18 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4cedfc7..c0da5db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-11-14 Gunnar Wrobel <p@rdus.de>
+ * layman/overlays/overlay.py: layman-1.2.0-r1, TR locale
+ error (#235165)
+ http://bugs.gentoo.org/show_bug.cgi?id=235165
+
+ * layman/action.py: layman-1.2.0-r1, TR locale error (#235165)
+ http://bugs.gentoo.org/show_bug.cgi?id=235165
+
* layman/db.py (DB.add): Do not remove directories if adding an
overlay failed (#236945)
http://bugs.gentoo.org/show_bug.cgi?id=236945
diff --git a/layman/action.py b/layman/action.py
index d5bd032..b472114 100644
--- a/layman/action.py
+++ b/layman/action.py
@@ -96,7 +96,8 @@ class Sync:
self.selection = self.db.overlays.keys()
enc = sys.getfilesystemencoding()
- self.selection = [i.decode(enc) for i in self.selection]
+ if enc:
+ self.selection = [i.decode(enc) for i in self.selection]
def run(self):
'''Synchronize the overlays.'''
@@ -157,7 +158,8 @@ class Add:
self.selection = config['add']
enc = sys.getfilesystemencoding()
- self.selection = [i.decode(enc) for i in self.selection]
+ if enc:
+ self.selection = [i.decode(enc) for i in self.selection]
if 'ALL' in self.selection:
self.selection = self.rdb.overlays.keys()
@@ -204,7 +206,8 @@ class Delete:
self.selection = config['delete']
enc = sys.getfilesystemencoding()
- self.selection = [i.decode(enc) for i in self.selection]
+ if enc:
+ self.selection = [i.decode(enc) for i in self.selection]
if 'ALL' in self.selection:
self.selection = self.db.overlays.keys()
@@ -281,7 +284,8 @@ class Info:
self.selection = config['info']
enc = sys.getfilesystemencoding()
- self.selection = [i.decode(enc) for i in self.selection]
+ if enc:
+ self.selection = [i.decode(enc) for i in self.selection]
if 'ALL' in self.selection:
self.selection = self.rdb.overlays.keys()
diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py
index 14aaa94..56186d8 100644
--- a/layman/overlays/overlay.py
+++ b/layman/overlays/overlay.py
@@ -154,8 +154,9 @@ class Overlay:
OUT.info('Running command "' + command + '"...', 2)
if hasattr(sys.stdout,'encoding'):
- command = command.encode(sys.stdout.encoding or
- sys.getfilesystemencoding())
+ enc = sys.stdout.encoding or sys.getfilesystemencoding()
+ if enc:
+ command = command.encode(enc)
if not self.quiet:
return os.system(command)