dont use print

This commit is contained in:
j 2016-02-07 18:24:07 +05:30
parent 9747f27d31
commit 2bad1b30d2
4 changed files with 3 additions and 6 deletions

View file

@ -441,7 +441,7 @@ class Changelog(db.Model):
data = peer.json(['username', 'contact']) data = peer.json(['username', 'contact'])
action[peer_id] = [revision, timestamp, data] action[peer_id] = [revision, timestamp, data]
else: else:
print('unknonw action', data) logger.debug('unknonw action %s', data)
_changes = [] _changes = []
for op in list(changes): for op in list(changes):
if not changes[op]: if not changes[op]:

View file

@ -17,7 +17,6 @@ root_dir = dirname(settings.base_dir)
HIDDEN = ['install_update', 'install_launcher', 'uninstall_launcher'] HIDDEN = ['install_update', 'install_launcher', 'uninstall_launcher']
def r(*cmd): def r(*cmd):
print(' '.join(cmd))
return subprocess.call(cmd) return subprocess.call(cmd)
def version(module): def version(module):

View file

@ -19,7 +19,6 @@ def parse(data, model):
for key in ('keys', 'group', 'list', 'range', 'sort', 'query'): for key in ('keys', 'group', 'list', 'range', 'sort', 'query'):
if key in data: if key in data:
query[key] = data[key] query[key] = data[key]
# print(data)
query['qs'] = model.query query['qs'] = model.query
if 'query' in data and data['query'].get('conditions'): if 'query' in data and data['query'].get('conditions'):
conditions = [] conditions = []
@ -96,12 +95,12 @@ def findNames(data):
pass pass
#ids = [i.id for i in q['qs'].options(load_only('id'))] #ids = [i.id for i in q['qs'].options(load_only('id'))]
#response['position'] = utils.get_positions(ids, [data['qs'][0].id])[0] #response['position'] = utils.get_positions(ids, [data['qs'][0].id])[0]
print('fixme', data) logger.debug('fix position request %s', data)
elif 'positions' in data: elif 'positions' in data:
#ids = [i.id for i in q['qs'].options(load_only('id'))] #ids = [i.id for i in q['qs'].options(load_only('id'))]
#response['positions'] = utils.get_positions(ids, data['positions']) #response['positions'] = utils.get_positions(ids, data['positions'])
response['positions'] = [] response['positions'] = []
print('fixme', data) logger.debug('fix positions request %s', data)
elif 'keys' in data: elif 'keys' in data:
response['items'] = [] response['items'] = []
for i in q['qs'][q['range'][0]:q['range'][1]]: for i in q['qs'][q['range'][0]:q['range'][1]]:

View file

@ -111,7 +111,6 @@ def find(title=None, author=None):
'start-index':1, 'start-index':1,
'min-viewability':'none', 'min-viewability':'none',
}) })
print(url)
data = read_url(url) data = read_url(url)
feed = etree.fromstring(data, feed = etree.fromstring(data,
parser=etree.XMLParser(recover=True, no_network=True)) parser=etree.XMLParser(recover=True, no_network=True))