Skip to content

Commit 1150e52

Browse files
committed
feat: httpc.catcher용 cli 추가
1 parent bb19a24 commit 1150e52

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/httpc/catcher/__main__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import sys
2+
3+
from httpc._base import logger
4+
from httpc.catcher._db import TransactionDatabase
5+
6+
7+
def main():
8+
if len(sys.argv) < 3:
9+
return 1
10+
elif sys.argv[1] == "migrate":
11+
with TransactionDatabase(sys.argv[2], "transactions", migrate_old_database=True):
12+
pass
13+
logger.warning(f"Database {sys.argv[2]!r} has been migrated.")
14+
15+
16+
if __name__ == "__main__":
17+
sys.exit(main())

0 commit comments

Comments
 (0)