Skip to content

Commit 7be6ccd

Browse files
cjo20bewest
authored andcommitted
Re-order default search locations and enable expansion of ~ to the users home directory
Cherry-picking from openaps#50 Conflicts: openaps/config.py
1 parent b9c2c6a commit 7be6ccd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openaps/config.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
from ConfigParser import SafeConfigParser
33
import re
4-
4+
import os
55

66
class Config (SafeConfigParser):
77
OPTCRE = re.compile(
@@ -35,7 +35,7 @@ def remove_device (self, device):
3535
section = device.section_name( )
3636
self.remove_section(section)
3737
@classmethod
38-
def Read (klass, name=None, defaults=['openaps.ini', '~/.openaps.ini', '/etc/openaps/openaps.ini']):
38+
def Read (klass, name=None, defaults=["/etc/openaps/openaps.ini", os.path.expanduser("~/.openaps.ini"), 'openaps.ini']):
3939
config = Config( )
4040
if name:
4141
config.set_ini_path(name)

0 commit comments

Comments
 (0)