diff --git a/komrade/backend/komrades.py b/komrade/backend/komrades.py index 82f47d3..0622df2 100644 --- a/komrade/backend/komrades.py +++ b/komrade/backend/komrades.py @@ -20,7 +20,7 @@ def Komrade(name,pubkey=None,*x,**y): pk64 = None if not pubkey else b64enc(pubkey) if pk64 in PHONEBOOK: return PHONEBOOK[pk64] - print(f'finding Komrade {name} / {pubkey} for the first time!') + # print(f'finding Komrade {name} / {pubkey} for the first time!') # operator? if name==OPERATOR_NAME: kommie = TheOperator() #(*x,**y) @@ -60,7 +60,7 @@ class KomradeX(Caller): keys = self.keychain() if keys.get('pubkey') and keys.get('privkey'): - self.log('already booted! @'+self.name) + # self.log('already booted! @'+self.name) return True if self.exists_locally_as_account(): @@ -115,12 +115,10 @@ class KomradeX(Caller): # already have it? if self.exists_locally_as_account(): - self.log('You have already created this account.') - return + return {'success':False, 'status':'You have already created this account.'} if self.exists_locally_as_contact(): - self.log('This is already a contact of yours') - return + return {'success':False, 'status':'This is already a contact of yours'} ## 1) Have name? diff --git a/komrade/cli/box.txt b/komrade/cli/box.txt new file mode 100644 index 0000000..c709487 --- /dev/null +++ b/komrade/cli/box.txt @@ -0,0 +1,30 @@ +|__________________________________________________________________________________________ +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +|__________________________________________________________________________________________ diff --git a/komrade/cli/cli.py b/komrade/cli/cli.py index 1b1fd7c..84322b8 100644 --- a/komrade/cli/cli.py +++ b/komrade/cli/cli.py @@ -79,8 +79,10 @@ class CLI(Logger): self.name=None self.loggedin=False self.komrade=None - if 'status' in res: - print('@Operator: '+res.get('status','?')) + if res and 'status' in res: + # self.boot() + print('\n@Operator: '+res.get('status','?')+'\n') + def login(self,name): print(self,name,self.name,self.komrade,self.loggedin)