Giter VIP home page Giter VIP logo

bbts's People

Contributors

qm2k avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

bbts's Issues

ValueError: time data '11:39:07 -0500' does not match format '%Y-%m-%d %H:%M:%S'

Hello,

I'm trying to backup a new client on a brand new server (so no prior backups). I noticed burp is sending /data/burp/data/client_name/current as current path and this file doesn't exists. In the client_name directory I only have files .command and .created. The file .created contains a timestamp (2023-01-13 11:39:07 -0500).

The script is crashing with this stack trace:

Jan 13 11:39:07 dsb5 burp[3307127]: WARNING: Traceback (most recent call last):
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:   File "/usr/local/bin/timer_script.py", line 436, in <module>
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:     sys.exit(main(sys.argv))
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:   File "/usr/local/bin/timer_script.py", line 431, in main
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:     conditions_check = check_conditions(prior_path, *argument_strings)
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:   File "/usr/local/bin/timer_script.py", line 403, in check_conditions
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:     prior_backup = Backup(prior_path)
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:   File "/usr/local/bin/timer_script.py", line 127, in __init__
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:     self.client_created = self.__get_client_created_timestamp() if self.path and self.is_new() else None
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:   File "/usr/local/bin/timer_script.py", line 116, in __get_client_created_timestamp
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:     return read_timestamp(filename)
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:   File "/usr/local/bin/timer_script.py", line 93, in read_timestamp
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:     timestamp = datetime.datetime.strptime(timestamp_string, '%Y-%m-%d %H:%M:%S')
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:   File "/usr/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:     tt, fraction, gmtoff_fraction = _strptime(data_string, format)
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:   File "/usr/lib/python3.10/_strptime.py", line 349, in _strptime
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING:     raise ValueError("time data %r does not match format %r" %
Jan 13 11:39:07 dsb5 burp[3307127]: WARNING: ValueError: time data '11:39:07 -0500' does not match format '%Y-%m-%d %H:%M:%S'
Jan 13 11:39:07 dsb5 burp[3307127]: /usr/local/bin/timer_script.py returned: 1

Running on Ubuntu 22.04, BURP 2.4.0, Python 3.10.6.

Thanks!

verbosity levels

Currently it's either something or nothing. More levels would be useful:

  • errors only;
  • matched rule;
  • matched date, failed conditions;
  • everything (matched items etc.).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.