From a31a3b643e0c0fcab3a58214dceb6f15aac81a62 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 5 Nov 2014 16:22:13 +0100 Subject: [PATCH] Cleanup --- client/cli/bam.py | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/client/cli/bam.py b/client/cli/bam.py index 59427ef..2c81fd1 100755 --- a/client/cli/bam.py +++ b/client/cli/bam.py @@ -107,16 +107,9 @@ class bam_utils: def __new__(cls, *args, **kwargs): raise RuntimeError("%s should not be instantiated" % cls) - @staticmethod - def session_find_url(): - return "http://localhost:5000" - @staticmethod def session_request_url(req_path): - # TODO, get from config cfg = bam_config.load() - - BAM_SERVER = bam_utils.session_find_url() result = "%s/%s" % (cfg['url'], req_path) return result @@ -140,15 +133,14 @@ class bam_utils: # Add a config file with project url, username and password bam_config.write( "config", - {"url":url, - "user":"bam", - "password":"bam", - "config_version":1 + {"url": url, + "user": "bam", + "password": "bam", + "config_version": 1 }, cwd=bam_folder) - - print("Project %s initialized" % project_directory_name) + print("Project %r initialized" % project_directory_name) @staticmethod def checkout(paths): @@ -314,7 +306,6 @@ class bam_utils: @staticmethod def list_dir(paths): - import sys import requests # Load project configuration @@ -490,7 +481,6 @@ def create_argparse_deps(subparsers): def create_argparse(): - import os import argparse usage_text = ( @@ -503,7 +493,8 @@ def create_argparse(): subparsers = parser.add_subparsers( title='subcommands', description='valid subcommands', - help='additional help') + help='additional help', + ) create_argparse_init(subparsers) create_argparse_checkout(subparsers) @@ -533,4 +524,3 @@ def main(): if __name__ == "__main__": main() -