def main(argv):
    if argv in '-h':
        print "./simulate.py [backup-timestamps]"
        return 1

    # Do some default simulation
    if not argv:
        s = BackupSimulator(parse_deltas('1d 7d 30d'))

        until = s.now + timedelta(days=17)
        while s.now <= until:
            s.go_by(timedelta(days=1))
            s.backup()

        for name, date in s.backups.iteritems():
            print name

    # Simulate a backup with the timestamps given
    else:
        s = BackupSimulator(parse_deltas('1d 7d 30d'))
        s.add([d for d in argv])
        deleted, _ = s.expire()

        print "Deleted backups:"
        for name in deleted:
            print(name)

        print ""
        print "Remaining backups:"
        for name, date in s.backups.iteritems():
            print name
dataset/ETHPy150Open miracle2k/tarsnapper/simulate.py/main/swapped operands of `in`