update rst readme, remove unused import
This commit is contained in:
@@ -76,7 +76,7 @@ def get(args, api_client):
|
||||
|
||||
try:
|
||||
pasteid, passphrase = args.pasteinfo.split("#")
|
||||
except:
|
||||
except ValueError:
|
||||
print("PBinCLI error: provided info hasn't contain valid PasteID#Passphrase string")
|
||||
exit(1)
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class PrivateBin:
|
||||
|
||||
try:
|
||||
return result.json()
|
||||
except:
|
||||
except ValueError:
|
||||
print("ERROR: Unable parse response as json. Received (size = {}):\n{}".format(len(result.text), result.text))
|
||||
exit(1)
|
||||
|
||||
@@ -40,7 +40,7 @@ class PrivateBin:
|
||||
headers = self.headers,
|
||||
proxies = self.proxy,
|
||||
data = request).json()
|
||||
except:
|
||||
except ValueError:
|
||||
# unable parse response as json because it can be empty (1.2), so simulate correct answer
|
||||
print("NOTICE: Received empty response. We interpret that as our paste has already been deleted.")
|
||||
from json import loads as json_loads
|
||||
|
||||
@@ -186,7 +186,6 @@ class Paste:
|
||||
self._attachment = cipher_message['attachment']
|
||||
self._attachment_name = cipher_message['attachment_name']
|
||||
else:
|
||||
from hashlib import sha256
|
||||
from sjcl import SJCL
|
||||
|
||||
password = self.__preparePassKey()
|
||||
|
||||
Reference in New Issue
Block a user