From 258502701825272926a8a8e133b45e3f3957d837 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Mon, 17 Jan 2011 23:59:24 -0800 Subject: fix a bug when the selection is None --- layman/utils.py | 2 ++ 1 file changed, 2 insertions(+) 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] -- cgit v1.2.3-65-gdbad