Skip to content

Commit fe58dea

Browse files
committed
fix main
Signed-off-by: Zen <[email protected]>
1 parent 54b78e6 commit fe58dea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/pycpio/main.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ def main():
3232
if args.input:
3333
c.read_cpio_file(Path(args.input))
3434

35-
if args.rm:
35+
if 'rm' in args:
3636
c.remove_cpio(args.rm)
3737

38-
if args.symlink:
38+
if 'symlink' in args:
3939
if not args.name:
4040
raise ValueError('Symlink requires a name')
4141
c.add_symlink(args.name, args.symlink)
4242

43-
if args.chardev:
43+
if 'chardev' in args:
4444
if not args.major or not args.minor:
4545
raise ValueError('Character device requires major and minor numbers')
4646
c.add_chardev(args.chardev, int(args.major), int(args.minor))
4747

48-
if args.append:
48+
if 'append' in args:
4949
relative = args.relative if args.relative else None
5050
cmdargs = {'relative': relative, 'path': Path(args.append)}
5151

@@ -60,13 +60,13 @@ def main():
6060
else:
6161
c.append_cpio(**cmdargs)
6262

63-
if args.output:
63+
if 'output' in args:
6464
c.write_cpio_file(Path(args.output))
6565

66-
if args.list:
66+
if 'list' in args:
6767
print(c.list_files())
6868

69-
if args.print:
69+
if 'print' in args:
7070
print(c)
7171

7272

0 commit comments

Comments
 (0)