From 2bad1b30d28587fb9ad610231c0ba8030a40ab0d Mon Sep 17 00:00:00 2001 From: j Date: Sun, 7 Feb 2016 18:24:07 +0530 Subject: [PATCH] dont use print --- oml/changelog.py | 2 +- oml/commands.py | 1 - oml/item/person_api.py | 5 ++--- oml/meta/google.py | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/oml/changelog.py b/oml/changelog.py index 50446ff..15c185b 100644 --- a/oml/changelog.py +++ b/oml/changelog.py @@ -441,7 +441,7 @@ class Changelog(db.Model): data = peer.json(['username', 'contact']) action[peer_id] = [revision, timestamp, data] else: - print('unknonw action', data) + logger.debug('unknonw action %s', data) _changes = [] for op in list(changes): if not changes[op]: diff --git a/oml/commands.py b/oml/commands.py index b373879..91da8be 100644 --- a/oml/commands.py +++ b/oml/commands.py @@ -17,7 +17,6 @@ root_dir = dirname(settings.base_dir) HIDDEN = ['install_update', 'install_launcher', 'uninstall_launcher'] def r(*cmd): - print(' '.join(cmd)) return subprocess.call(cmd) def version(module): diff --git a/oml/item/person_api.py b/oml/item/person_api.py index 9d428e8..e6cb8dc 100644 --- a/oml/item/person_api.py +++ b/oml/item/person_api.py @@ -19,7 +19,6 @@ def parse(data, model): for key in ('keys', 'group', 'list', 'range', 'sort', 'query'): if key in data: query[key] = data[key] - # print(data) query['qs'] = model.query if 'query' in data and data['query'].get('conditions'): conditions = [] @@ -96,12 +95,12 @@ def findNames(data): pass #ids = [i.id for i in q['qs'].options(load_only('id'))] #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: #ids = [i.id for i in q['qs'].options(load_only('id'))] #response['positions'] = utils.get_positions(ids, data['positions']) response['positions'] = [] - print('fixme', data) + logger.debug('fix positions request %s', data) elif 'keys' in data: response['items'] = [] for i in q['qs'][q['range'][0]:q['range'][1]]: diff --git a/oml/meta/google.py b/oml/meta/google.py index 7bcbf42..b2988f1 100644 --- a/oml/meta/google.py +++ b/oml/meta/google.py @@ -111,7 +111,6 @@ def find(title=None, author=None): 'start-index':1, 'min-viewability':'none', }) - print(url) data = read_url(url) feed = etree.fromstring(data, parser=etree.XMLParser(recover=True, no_network=True))