Fixed: Addressed PR comments

This commit is contained in:
coffeedogs 2018-05-14 17:14:20 +01:00
parent c440fb67f0
commit 80f7033ad4
No known key found for this signature in database
GPG Key ID: 9D818C503D0B7E70
4 changed files with 5 additions and 54 deletions

View File

@ -32,9 +32,8 @@ Furthermore, you can use -- to run arbitrary shell commands rather than tasks:
* Install Fabric, fabric-virtualenv, virtualenvwrapper system-wide (log in to a new terminal afterwards if you're installing
virtualenvwrappers for the first time)
$ sudo apt install Fabric virtualenvwrapper; sudo pip install fabric-virtualenv
* Create a virtualenv called pybitmessage and install fabfile/requirements.txt
$ mkvirtualenv --system-site-packages pybitmessage-devops
$ pip install -r fabfile/requirements.txt
Create a virtualenv called pybitmessage and install fabfile/requirements.txt
$ mkvirtualenv -r fabfile/requirements.txt --system-site-packages pybitmessage-devops
* Ensure you can ssh localhost with no intervention, which may include:
* settings in ~/.ssh/config
* authorized_keys file
@ -51,5 +50,5 @@ There are a number of advantages that should benefit us:
* All developers can run the same commands, if the underlying command sequence for a task changes (after review, obv)
the user does not have to care
* Tasks can be combined either programmatically or on the commandline and run in series or parallel
* Whoee environemnts can be managed very effectively in conjunction with a configuration management system
* Whole environments can be managed very effectively in conjunction with a configuration management system

View File

@ -32,8 +32,7 @@ def coerce_bool(value):
):
return True
else:
print "Bad boolean value {}".format(value)
sys.exit(1)
sys.exit("Bad boolean value {}".format(value))
def flatten(data):

View File

@ -89,7 +89,7 @@ def code_quality(top=10, verbose=True, details=False, fix=False, filename=None):
Check code quality.
By default this command will analyse each Python file in the project with a variety of tools and display the count
or details of the violations discovered, sorted by most iolations first.
or details of the violations discovered, sorted by most violations first.
Default usage:

View File

@ -622,53 +622,6 @@ def genAdd(lbl, deterministic, passphrase, numOfAdd, addVNum, streamNum, ripe):
return 'Entry Error'
def delMilAddr():
"""Delete address"""
global usrPrompt
try:
response = api.listAddresses2()
# if api is too old just return then fail
if "API Error 0020" in response:
return
addresses = json.loads(response)
for entry in addresses['addresses']:
if entry['label'].decode('base64')[:6] == "random":
api.deleteAddress(entry['address'])
except:
print '\n Connection Error\n'
usrPrompt = 0
main()
def genMilAddr():
"""Generate address"""
global usrPrompt
maxn = 0
try:
response = api.listAddresses2()
if "API Error 0020" in response:
return
addresses = json.loads(response)
for entry in addresses['addresses']:
if entry['label'].decode('base64')[:6] == "random":
newn = int(entry['label'].decode('base64')[6:])
if maxn < newn:
maxn = newn
except:
print "\n Some error\n"
print "\n Starting at " + str(maxn) + "\n"
for i in range(maxn, 10000):
lbl = "random" + str(i)
addressLabel = lbl.encode('base64')
try:
api.createRandomAddress(addressLabel) # generatedAddress =
except:
print '\n Connection Error\n'
usrPrompt = 0
main()
def saveFile(fileName, fileData):
"""Allows attachments and messages/broadcats to be saved"""