aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <brian.dolbec@gmail.com>2011-01-17 23:59:24 -0800
committerBrian Dolbec <brian.dolbec@gmail.com>2011-01-17 23:59:24 -0800
commit258502701825272926a8a8e133b45e3f3957d837 (patch)
tree6c633366abadc20bb5c9dde9a2eb6aa14564e98d
parentadd a list_ids() (diff)
downloadoverlord-258502701825272926a8a8e133b45e3f3957d837.tar.gz
overlord-258502701825272926a8a8e133b45e3f3957d837.tar.bz2
overlord-258502701825272926a8a8e133b45e3f3957d837.zip
fix a bug when the selection is None
-rw-r--r--layman/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/layman/utils.py b/layman/utils.py
index 79b3c18..67a0ab7 100644
--- a/layman/utils.py
+++ b/layman/utils.py
@@ -47,6 +47,8 @@ def decode_selection(selection):
'''utility function to decode a list of strings
accoring to the filesystem encoding
'''
+ # fix None passed in, return an empty list
+ selection = selection or []
enc = sys.getfilesystemencoding()
if enc:
return [i.decode(enc) for i in selection]