Skip to content

Commit

Permalink
Rev619, Fix sitesign without users.json, Fix readme typo
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Nov 28, 2015
1 parent 85c2799 commit 675bd46
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Decentralized websites using Bitcoin crypto and the BitTorrent network - http://
* When you visit a new zeronet site, it tries to find peers using the BitTorrent
network so it can download the site files (html, css, js...) from them.
* Each visited site becomes also served by you.
* Every site contains a `site.json` which holds all other files in a sha512 hash
* Every site contains a `content.json` which holds all other files in a sha512 hash
and a signature generated using site's private key.
* If the site owner (who has the private key for the site address) modifies the
site, then he/she signs the new `content.json` and publishes it to the peers.
Expand Down
2 changes: 1 addition & 1 deletion src/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Config(object):

def __init__(self, argv):
self.version = "0.3.3"
self.rev = 618
self.rev = 619
self.argv = argv
self.action = None
self.createParser()
Expand Down
7 changes: 5 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,11 @@ def siteSign(self, address, privatekey=None, inner_path="content.json", publish=
if not privatekey: # If no privatekey definied
from User import UserManager
user = UserManager.user_manager.get()
site_data = user.getSiteData(address)
privatekey = site_data.get("privatekey")
if user:
site_data = user.getSiteData(address)
privatekey = site_data.get("privatekey")
else:
privatekey = None
if not privatekey:
# Not found in users.json, ask from console
import getpass
Expand Down

0 comments on commit 675bd46

Please sign in to comment.