nncli

NextCloud Notes Command Line Interface
git clone git://git.danielmoch.com/nncli.git
Log | Files | Refs | LICENSE

commit c730311cbb9a21a1835358b38f3037b68be87d10
parent 9888cb7e1af42b79dc1fffb439486744a59a7833
Author: Eric Davis <edavis@insanum.com>
Date:   Mon,  7 Jul 2014 14:46:20 -0700

commented out extraneous HTTP request/reponse logging

Diffstat:
Msimplenote.py | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/simplenote.py b/simplenote.py @@ -101,15 +101,15 @@ def get_note(self, noteid, version=None): params_version = '/' + str(version) params = '/%s%s?auth=%s&email=%s' % (str(noteid), params_version, self.get_token(), self.username) - logging.debug('REQUEST: ' + DATA_URL+params) + #logging.debug('REQUEST: ' + DATA_URL+params) request = Request(DATA_URL+params) try: response = urllib2.urlopen(request) except HTTPError, e: - logging.debug('RESPONSE ERROR: ' + str(e)) + #logging.debug('RESPONSE ERROR: ' + str(e)) return e, -1 except IOError, e: - logging.debug('RESPONSE ERROR: ' + str(e)) + #logging.debug('RESPONSE ERROR: ' + str(e)) return e, -1 note = json.loads(response.read()) # use UTF-8 encoding @@ -117,7 +117,7 @@ def get_note(self, noteid, version=None): # For early versions of notes, tags not always available if note.has_key("tags"): note["tags"] = [t.encode('utf-8') for t in note["tags"]] - logging.debug('RESPONSE OK: ' + str(note)) + #logging.debug('RESPONSE OK: ' + str(note)) return note, 0 def update_note(self, note): @@ -157,13 +157,13 @@ def update_note(self, note): self.get_token(), self.username) else: url = '%s?auth=%s&email=%s' % (DATA_URL, self.get_token(), self.username) - logging.debug('REQUEST: ' + url + ' - ' + str(note)) + #logging.debug('REQUEST: ' + url + ' - ' + str(note)) request = Request(url, urllib.quote(json.dumps(note))) response = "" try: response = urllib2.urlopen(request) except IOError, e: - logging.debug('RESPONSE ERROR: ' + str(e)) + #logging.debug('RESPONSE ERROR: ' + str(e)) return e, -1 note = json.loads(response.read()) if note.has_key("content"): @@ -171,7 +171,7 @@ def update_note(self, note): note["content"] = note["content"].encode('utf-8') if note.has_key("tags"): note["tags"] = [t.encode('utf-8') for t in note["tags"]] - logging.debug('RESPONSE OK: ' + str(note)) + #logging.debug('RESPONSE OK: ' + str(note)) return note, 0 def add_note(self, note):