summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnuradio-core/src/python/gnuradio/gr/prefs.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gr/prefs.py b/gnuradio-core/src/python/gnuradio/gr/prefs.py
index 644aea848..25fa8cd6a 100644
--- a/gnuradio-core/src/python/gnuradio/gr/prefs.py
+++ b/gnuradio-core/src/python/gnuradio/gr/prefs.py
@@ -27,6 +27,7 @@ import ConfigParser
import os
import os.path
import sys
+import glob
def _user_prefs_filename():
@@ -53,18 +54,18 @@ class _prefs(_prefs_base):
invoke the methods in this python class.
"""
def __init__(self):
- _prefs_base.__init__(self)
- self.cp = ConfigParser.RawConfigParser()
- self.__getattr__ = lambda self, name: getattr(self.cp, name)
+ _prefs_base.__init__(self)
+ self.cp = ConfigParser.RawConfigParser()
+ self.__getattr__ = lambda self, name: getattr(self.cp, name)
def _sys_prefs_filenames(self):
dir = _sys_prefs_dirname()
try:
- fnames = os.listdir(dir)
+ fnames = glob.glob(os.path.join(dir, '*.conf'))
except (IOError, OSError):
return []
fnames.sort()
- return [os.path.join(dir, f) for f in fnames]
+ return fnames
def _read_files(self):
filenames = self._sys_prefs_filenames()