Fixed: Addressed PR comments
This commit is contained in:
parent
c440fb67f0
commit
80f7033ad4
|
@ -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
|
* Install Fabric, fabric-virtualenv, virtualenvwrapper system-wide (log in to a new terminal afterwards if you're installing
|
||||||
virtualenvwrappers for the first time)
|
virtualenvwrappers for the first time)
|
||||||
$ sudo apt install Fabric virtualenvwrapper; sudo pip install fabric-virtualenv
|
$ sudo apt install Fabric virtualenvwrapper; sudo pip install fabric-virtualenv
|
||||||
* Create a virtualenv called pybitmessage and install fabfile/requirements.txt
|
Create a virtualenv called pybitmessage and install fabfile/requirements.txt
|
||||||
$ mkvirtualenv --system-site-packages pybitmessage-devops
|
$ mkvirtualenv -r fabfile/requirements.txt --system-site-packages pybitmessage-devops
|
||||||
$ pip install -r fabfile/requirements.txt
|
|
||||||
* Ensure you can ssh localhost with no intervention, which may include:
|
* Ensure you can ssh localhost with no intervention, which may include:
|
||||||
* settings in ~/.ssh/config
|
* settings in ~/.ssh/config
|
||||||
* authorized_keys file
|
* 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)
|
* 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
|
the user does not have to care
|
||||||
* Tasks can be combined either programmatically or on the commandline and run in series or parallel
|
* 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
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,7 @@ def coerce_bool(value):
|
||||||
):
|
):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
print "Bad boolean value {}".format(value)
|
sys.exit("Bad boolean value {}".format(value))
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
|
|
||||||
def flatten(data):
|
def flatten(data):
|
||||||
|
|
|
@ -89,7 +89,7 @@ def code_quality(top=10, verbose=True, details=False, fix=False, filename=None):
|
||||||
Check code quality.
|
Check code quality.
|
||||||
|
|
||||||
By default this command will analyse each Python file in the project with a variety of tools and display the count
|
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:
|
Default usage:
|
||||||
|
|
||||||
|
|
|
@ -622,53 +622,6 @@ def genAdd(lbl, deterministic, passphrase, numOfAdd, addVNum, streamNum, ripe):
|
||||||
return 'Entry Error'
|
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):
|
def saveFile(fileName, fileData):
|
||||||
"""Allows attachments and messages/broadcats to be saved"""
|
"""Allows attachments and messages/broadcats to be saved"""
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user