Skip to content

Conversation

@gallofeliz
Copy link
Contributor

Hi,

I started to use this code to backup my repositories, but I use it directly with Python.

The main problems :

  • Forcing to pass an USER in the command (after I make a args.user = os.environ['USER'] to change it, it's okay)
  • In case of "error", the script will exit ; what I don't want
  • Logs are directly writen in stdout and stderr, so I can't format them

I tryed in this MR to make the smaller changes as possible with the same behavior for CLI :

  • args can be passed to parse_args()
  • Use of logging module to be able to change formatting
  • Errors are now Exceptions and catched by the cli file to be transformated to a log + exit

We need to test all is okay, but I can detect a small change : log time uses now 3 decimals for microseconds and no more 6.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants