issue 10 fix
This commit is contained in:
parent
a39cd7ae68
commit
0fd4ff9b74
2
setup.py
2
setup.py
|
@ -13,7 +13,7 @@ def main():
|
|||
long_description='SSH connection and aliases manager with curses and command line interface',
|
||||
long_description_content_type='text/x-rst',
|
||||
license='DWTWL 2.55',
|
||||
version='1.03',
|
||||
version='1.04',
|
||||
py_modules=['sshch'],
|
||||
scripts=['sshch/sshch'],
|
||||
keywords='sshch ssh aliases curses manager',
|
||||
|
|
13
sshch/sshch
13
sshch/sshch
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import division
|
||||
|
@ -20,11 +20,12 @@ import curses
|
|||
from curses import textpad, panel
|
||||
|
||||
# https://gitlab.com/zlax/sshch
|
||||
version = "1.03"
|
||||
# path to conf file, default: ~/.config/sshch.conf
|
||||
conf_file = path.expanduser("~") + '/.config/sshch.conf'
|
||||
version = "1.04"
|
||||
# expand groups by default
|
||||
expand_default = True
|
||||
# path to conf dir and file, default: ~/.config/sshch.conf
|
||||
conf_dir = path.expanduser("~") + '/.config'
|
||||
conf_file = conf_dir + '/' + 'sshch.conf'
|
||||
|
||||
|
||||
def AddNewAlias(alias):
|
||||
|
@ -806,6 +807,10 @@ if __name__ == "__main__":
|
|||
except NameError:
|
||||
pass
|
||||
|
||||
if not path.exists(conf_dir):
|
||||
from os import makedirs
|
||||
makedirs(conf_dir)
|
||||
|
||||
conf = configparser.RawConfigParser()
|
||||
if not path.exists(conf_file):
|
||||
open(conf_file, 'w')
|
||||
|
|
Loading…
Reference in New Issue