@@ -68,12 +68,12 @@ class PyCdlibCmdLoop(cmd.Cmd):
68
68
def do_quit (self , line ):
69
69
"""The other command to quit the program."""
70
70
if line :
71
- print ( 'No parameters allowed for quit' )
71
+ self . help_quit ( )
72
72
return False
73
73
return True
74
74
75
75
def do_EOF (self , line ): # pylint: disable=unused-argument
76
- """Handel EOF on the terminal."""
76
+ """Handle EOF on the terminal."""
77
77
print ()
78
78
return True
79
79
@@ -107,7 +107,7 @@ class PyCdlibCmdLoop(cmd.Cmd):
107
107
print (self .print_mode )
108
108
return False
109
109
if splitlen != 1 :
110
- print ( 'Only a single parameter allowed for print_mode' )
110
+ self . help_print_mode ( )
111
111
return False
112
112
113
113
if split [0 ] not in self .PRINT_MODES :
@@ -149,7 +149,7 @@ class PyCdlibCmdLoop(cmd.Cmd):
149
149
def do_ls (self , line ):
150
150
"""The command to list the contents of a directory."""
151
151
if line :
152
- print ( 'No parameters allowed for ls' )
152
+ self . help_ls ( )
153
153
return False
154
154
155
155
diriter = self .iso .list_children (** {self .pathname : self .cwds [self .print_mode ]})
@@ -198,7 +198,7 @@ class PyCdlibCmdLoop(cmd.Cmd):
198
198
"""
199
199
split = shlex .split (line )
200
200
if len (split ) != 1 :
201
- print ( 'The cd command supports one and only one parameter' )
201
+ self . help_cd ( )
202
202
return False
203
203
204
204
directory = split [0 ]
@@ -227,7 +227,7 @@ class PyCdlibCmdLoop(cmd.Cmd):
227
227
"""
228
228
split = shlex .split (line )
229
229
if len (split ) != 2 :
230
- print ( 'The get command must be passed two parameters.' )
230
+ self . help_get ( )
231
231
return False
232
232
233
233
iso_file = split [0 ]
@@ -249,7 +249,7 @@ class PyCdlibCmdLoop(cmd.Cmd):
249
249
def do_cwd (self , line ):
250
250
"""The command to find out what the current working directory is."""
251
251
if line :
252
- print ( 'No parameters allowed for cwd' )
252
+ self . help_cwd ( )
253
253
return False
254
254
255
255
print (self .cwds [self .print_mode ])
@@ -267,7 +267,7 @@ class PyCdlibCmdLoop(cmd.Cmd):
267
267
current working directory in a convenient tree-like form.
268
268
"""
269
269
if line :
270
- print ( 'No parameters allowed for tree' )
270
+ self . help_tree ( )
271
271
return False
272
272
273
273
utf8_corner = '└──'
@@ -333,7 +333,7 @@ class PyCdlibCmdLoop(cmd.Cmd):
333
333
"""
334
334
split = shlex .split (line )
335
335
if len (split ) != 1 :
336
- print ( 'The write command supports one and only one parameter.' )
336
+ self . help_write ( )
337
337
return False
338
338
339
339
self .iso .write (split [0 ])
@@ -439,7 +439,7 @@ class PyCdlibCmdLoop(cmd.Cmd):
439
439
"""
440
440
split = shlex .split (line )
441
441
if len (split ) != 1 :
442
- print ( 'The rm_file command takes one and only one parameter (iso path).' )
442
+ self . help_rm_file ( )
443
443
return False
444
444
445
445
iso_path = split [0 ]
@@ -514,7 +514,7 @@ class PyCdlibCmdLoop(cmd.Cmd):
514
514
"""
515
515
split = shlex .split (line )
516
516
if len (split ) != 1 :
517
- print ( 'The rmdir command takes one and only one parameter (iso path).' )
517
+ self . help_rmdir ( )
518
518
return False
519
519
520
520
iso_path = split [0 ]
0 commit comments