Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
avatar-lavventura committed Apr 5, 2018
1 parent 20d81c4 commit e358664
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,7 @@ modifiedDate\.txt
ipfs\.out

clusterDriver\.out

\.node-xmlhttprequest-sync-8770

\.node-xmlhttprequest-sync-1849
6 changes: 3 additions & 3 deletions Driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ def isSlurmOn():
yes = set(['yes', 'y', 'ye']);
no = set(['no' , 'n']);


if constants.WHOAMI == '':
print('Once please run: bash initialize.sh');
sys.exit();

isContractExist = os.popen('python $contractCallPath/isContractExist.py $clusterID').read();
if isContractExist == 'False':
isContractExist = os.popen('python $contractCallPath/isContractExist.py').read();

if 'False' in isContractExist:
print('Please check that you are using eBloc-blockchain.');
sys.exit();

Expand Down
4 changes: 2 additions & 2 deletions contractCalls/isContractExist.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
contractAddress = web3.toChecksumAddress(contractAddress);
eBlocBroker = web3.eth.contract(contractAddress, abi=abi);

if __name__ == '__main__': #{
if web3.eth.getCode(contractAddress) == '0x':
if __name__ == '__main__': #{
if web3.eth.getCode(contractAddress) == '0x' or web3.eth.getCode(contractAddress) == b'':
print('False')
else:
print('True')
Expand Down
3 changes: 2 additions & 1 deletion initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ else
exit
fi
fi

source $HOME/.profile

currentDir=$PWD;
Expand Down Expand Up @@ -118,7 +119,7 @@ sudo sed -i.bak "s/^\(MailProg=\).*/\1$var\/slurmScript.sh/" /usr/local/etc/slur
grep "MailProg" /usr/local/etc/slurm.conf

# IPFS setups
sudo chown -R "$logname:$logname" ~/.ipfs/
sudo chown -R "$logname:$logname" $HOME/.ipfs/

echo -e "Note: Update the following file 'eudatPassword.txt' with your EUDAT account's password. \nBest to make sure the file is not readable or even listable for anyone but you. You achieve this with:\n 'chmod 700 eudatPassword.txt'"

Expand Down

0 comments on commit e358664

Please sign in to comment.