- from datetime import timedelta
- import model
- if __name__ == '__main__':
- timeout = float(input('How long will the initial selling be available? (minutes):'))
- try:
- expiry = model.current_db_timestamp() + timedelta(minutes=timeout)
- print(model.new_stock(expiry))
- model.cleanup()
- except OverflowError:
- print('The expiration time is too far in the future.')
|