diff options
Diffstat (limited to 'net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch')
-rw-r--r-- | net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch b/net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch new file mode 100644 index 000000000000..ee22dd20c1ed --- /dev/null +++ b/net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch @@ -0,0 +1,31 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 000-Fix_conf_file_search_path by +## Adam CĂ©cile (Le_Vert) <gandalf@le-vert.net> +## +## DP: Search for configuration file in $HOME/.hellanzb/ or /etc/ + +@DPATCH@ + +diff -u hellanzb-0.11/Hellanzb/Core.py hellanzb-0.11/Hellanzb/Core.py.new +--- hellanzb-0.11/Hellanzb/Core.py 2007-02-10 15:01:50.000000000 +0100 ++++ hellanzb-0.11/Hellanzb/Core.py.new 2007-02-10 15:05:48.000000000 +0100 +@@ -33,16 +33,9 @@ + else: + error('Unable to load specified config file: ' + optionalConfigFile) + sys.exit(1) +- +- # look for conf in this order: sys.prefix, ./, or ./etc/ +- confDirs = [os.path.join(sys.prefix, 'etc')] +- try: +- confDirs.append(os.path.join(os.getcwd(), 'etc')) +- confDirs.append(os.getcwd()) +- except OSError, ose: +- if ose.errno != 2: +- raise +- # OSError: [Errno 2] No such file or directory. cwd doesn't exist ++ ++ # Look for conf file in /etc or $HOME/.hellanzb ++ confDirs = [ os.path.expanduser('~') + '/.hellanzb', '/etc' ] + + # hard coding preferred Darwin config file location, kind of lame. but I'd rather do + # this then make an etc dir in os x's Python.framework directory |