bugfix on cli related to ImpraIndex

This commit is contained in:
a-sansara 2012-09-17 11:42:30 +02:00
parent 14a068a921
commit 54cd707836
5 changed files with 18 additions and 10 deletions

View File

@ -1 +0,0 @@
AAAAgKoUbEl0Uwdm4vPLvxFxdSkpm62QHsxV9eUgAbj5F8ctRqfQPCh654MGe0M9w15RqHLuiehsjv7A7r45NAyNUPC1b9bcoAtwMlrFocYvTUtNSFbw0moTQOnYeoulK2Hp7mRjxZ+jDzVu3D/5BMMm40x4KUmljFghGtV8oZd9WNvpAAAAAwEAAQ==

View File

@ -186,6 +186,8 @@ data command Examples:
if self.ini.has('profile') : o.active_profile = self.ini.get('profile') if self.ini.has('profile') : o.active_profile = self.ini.get('profile')
else : o.active_profile = 'default' else : o.active_profile = 'default'
print(self.ini)
if o.load_conf : self.load_profile(o) if o.load_conf : self.load_profile(o)
elif o.list_conf : print(self.ini.toString(o.active_profile)) elif o.list_conf : print(self.ini.toString(o.active_profile))
@ -197,12 +199,12 @@ data command Examples:
if o.set_port and not util.represents_int(o.set_port): if o.set_port and not util.represents_int(o.set_port):
parser.error(' port must be a number') parser.error(' port must be a number')
sys.exit(1) sys.exit(1)
if o.set_boxn: ini.set('box' , o.set_boxn,o.active_profile+'.imap') if o.set_boxn: self.ini.set('box' , o.set_boxn,o.active_profile+'.imap')
if o.set_host: ini.set('host', o.set_host,o.active_profile+'.imap') if o.set_host: self.ini.set('host', o.set_host,o.active_profile+'.imap')
if o.set_user: ini.set('user', o.set_user,o.active_profile+'.imap') if o.set_user: self.ini.set('user', o.set_user,o.active_profile+'.imap')
if o.set_pass: ini.set('pass', o.set_pass,o.active_profile+'.imap') if o.set_pass: self.ini.set('pass', o.set_pass,o.active_profile+'.imap')
if o.set_port: ini.set('port', o.set_port,o.active_profile+'.imap') if o.set_port: self.ini.set('port', o.set_port,o.active_profile+'.imap')
if o.set_name: ini.set('name', o.set_name,o.active_profile+'.infos') if o.set_name: self.ini.set('name', o.set_name,o.active_profile+'.infos')
if o.gen_keys: if o.gen_keys:
kg = crypt.KeyGen(256) kg = crypt.KeyGen(256)
self.ini.set('key' ,kg.key,o.active_profile+'.keys') self.ini.set('key' ,kg.key,o.active_profile+'.keys')
@ -243,8 +245,12 @@ you can remove index but all presents files on the box %s will be unrecoverable
sys.exit(1) sys.exit(1)
if o.list : if o.list :
uid = conf.get('uid' ,'index')
date = conf.get('date','index')
if uid == None : uid = 'EMPTY'
if date == None : date = ''
if impst.index != None: if impst.index != None:
impst.index.print(True,'-'*120+'\n -- INDEX(`'+conf.get('uid','index')+'`) boxname :`'+impst.rootBox+'` '+conf.get('date','index')+'\n'+'-'*120) impst.index.print(True,'-'*120+'\n -- INDEX(`'+uid+'`) boxname :`'+impst.rootBox+'` '+date+'\n'+'-'*120)
#encData = impst.index.impraEncrypt(impst.index.toString()) #encData = impst.index.impraEncrypt(impst.index.toString())
#~ dd = """coucou mon joli coeur :*:* je s""" #~ dd = """coucou mon joli coeur :*:* je s"""
#~ kg = crypt.KeyGen(256) #~ kg = crypt.KeyGen(256)

1
wk/deploy/.gitkeep Normal file
View File

@ -0,0 +1 @@
# .gitkeep

1
wk/inbox/.gitkeep Normal file
View File

@ -0,0 +1 @@
# .gitkeep

1
wk/outbox/.gitkeep Normal file
View File

@ -0,0 +1 @@
# .gitkeep