Unverified Commit c8520be5 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[refactor] minor refactoring for consistency

parent 2a39fcaf
......@@ -27,11 +27,11 @@ from twisted.internet import reactor, defer
from leap.bitmask.cli.eip import Eip
from leap.bitmask.cli.keys import Keys
from leap.bitmask.cli.mail import Mail
from leap.bitmask.cli.command import Command
from leap.bitmask.cli import command
from leap.bitmask.cli.user import User
class BitmaskCLI(Command):
class BitmaskCLI(command.Command):
usage = '''bitmaskctl <command> [<args>]
Controls the Bitmask application.
......@@ -83,7 +83,7 @@ GENERAL COMMANDS:
return defer.succeed(None)
def version(self, raw_args):
print(Fore.GREEN + 'bitmask_cli: ' + Fore.RESET + '0.0.1')
print(Fore.GREEN + 'bitmaskctl: ' + Fore.RESET + '0.0.1')
self.data = ['version']
return self._send(printer=self._print_version)
......
......@@ -17,10 +17,10 @@
"""
Bitmask Command Line interface: eip
"""
from leap.bitmask.cli.command import appname, Command
from leap.bitmask.cli import command
class Eip(Command):
class Eip(command.Command):
service = 'eip'
usage = '''{name} eip <subcommand>
......@@ -32,6 +32,6 @@ SUBCOMMANDS:
stop Stop service
status Display status about service
'''.format(name=appname)
'''.format(name=command.appname)
commands = ['start', 'stop', 'status']
......@@ -22,11 +22,11 @@ import sys
from colorama import Fore
from leap.bitmask.cli.command import appname, Command
from leap.bitmask.cli import command
from leap.keymanager.validation import ValidationLevels
class Keys(Command):
class Keys(command.Command):
service = 'keys'
usage = '''{name} keys <subcommand>
......@@ -38,7 +38,7 @@ SUBCOMMANDS:
export Export a given key
insert Insert a key to the key storage
delete Delete a key from the key storage
'''.format(name=appname)
'''.format(name=command.appname)
def list(self, raw_args):
parser = argparse.ArgumentParser(
......
......@@ -17,14 +17,14 @@
"""
Bitmask Command Line interface: mail
"""
from leap.bitmask.cli.command import appname, Command
from leap.bitmask.cli import command
class Mail(Command):
class Mail(command.Command):
service = 'mail'
usage = '''{name} mail <subcommand>
Bitmask Encrypted Email service
Bitmask Encrypted Email Service
SUBCOMMANDS:
......@@ -34,7 +34,7 @@ SUBCOMMANDS:
get-token Returns token for the mail service
get-smtp-certificate Downloads a new smtp certificate
'''.format(name=appname)
'''.format(name=command.appname)
commands = ['enable', 'disable', 'status', 'get-token',
'get-smtp-certificate']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment