Compare commits

..

No commits in common. "f05ffdd86d7e0694fcea573e8ba246a59cd99bdc" and "a7178b6f86d90215a4a5015c6130789c05b06243" have entirely different histories.

3 changed files with 7 additions and 21 deletions

View File

@ -37,15 +37,6 @@ r = c.connection.request(m)
Consult class documentation for more in depth examples and options.
## Interactive CLI
The package installs a script called `ommclient2`.
This allowes basic interactive testing of the library.
```
ommclient2 --help
```
## Attribution
This software is inspired by `python-mitel` by Thomas and n-st.

View File

@ -1,14 +1,14 @@
#!/usr/bin/env python3
from mitel_ommclient2 import OMMClient2
from mitel_ommclient2.exceptions import ENoEnt
from mitel_ommclient2.messages import GetAccount, Ping
import time
import argparse
import getpass
import time
import traceback
from . import OMMClient2
from .exceptions import ENoEnt
from .messages import GetAccount, Ping
# exit handling with argparse is a bit broken even with exit_on_error=False, so we hack this
def error_instead_exit(self, message):
raise argparse.ArgumentError(None, message)
@ -22,7 +22,8 @@ def format_list(v):
return fl
def main():
if __name__ == "__main__":
connect_parser = argparse.ArgumentParser(prog='ommclient2')
connect_parser.add_argument("-n", dest="hostname", default="127.0.0.1")
connect_parser.add_argument("-u", dest="username", default="omm")
@ -177,6 +178,3 @@ def main():
print("".join(traceback.format_exception(type(e), e, e.__traceback__)))
continue
print(format(r))
if __name__ == "__main__":
main()

View File

@ -23,8 +23,5 @@ crypt = [
"rsa",
]
[project.scripts]
ommclient2 = "mitel_ommclient2.cli:main"
[project.urls]
"Source" = "https://git.clerie.de/clerie/mitel_ommclient2"