From 12b6da26144abc39d2211c92fb9fefd8a5da5389 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 20 Mar 2012 14:55:16 +0530 Subject: [PATCH] sync with gateway now in defs - no need for utility in wnf --- wnf.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/wnf.py b/wnf.py index ca780cfe0e..0a4ff4bfd7 100755 --- a/wnf.py +++ b/wnf.py @@ -78,9 +78,7 @@ def setup_options(): # install parser.add_option('--install', nargs=3, metavar = "rootpassword dbname source", help="install fresh db") - parser.add_option('--sync_with_gateway', nargs=1, metavar = "1/0", \ - help="Set or Unset Sync with Gateway") - + # diff parser.add_option('--diff_ref_file', nargs=0, \ help="Get missing database records and mismatch properties, with file as reference") @@ -185,17 +183,6 @@ def run(): inst.import_from_db(options.install[1], source_path=options.install[2], \ password='admin', verbose = 1) - elif options.sync_with_gateway: - if int(options.sync_with_gateway[0]) in [0, 1]: - webnotes.conn.begin() - webnotes.conn.sql("""\ - UPDATE `tabSingles` SET value=%s - WHERE field='sync_with_gateway' AND doctype='Control Panel'""", int(options.sync_with_gateway[0])) - webnotes.conn.commit() - webnotes.message_log.append("sync_with_gateway set to %s" % options.sync_with_gateway[0]) - else: - webnotes.message_log.append("ERROR: sync_with_gateway can be either 0 or 1") - elif options.diff_ref_file is not None: import webnotes.modules.diff webnotes.modules.diff.diff_ref_file()