File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -724,6 +724,9 @@ def main(args=None):
724
724
locale = options .locale , options .encoding
725
725
726
726
if options .type == "html" :
727
+ if options .month :
728
+ parser .error ("incorrect number of arguments" )
729
+ sys .exit (1 )
727
730
if options .locale :
728
731
cal = LocaleHTMLCalendar (locale = locale )
729
732
else :
@@ -735,11 +738,8 @@ def main(args=None):
735
738
write = sys .stdout .buffer .write
736
739
if options .year is None :
737
740
write (cal .formatyearpage (datetime .date .today ().year , ** optdict ))
738
- elif options .month is None :
739
- write (cal .formatyearpage (options .year , ** optdict ))
740
741
else :
741
- parser .error ("incorrect number of arguments" )
742
- sys .exit (1 )
742
+ write (cal .formatyearpage (options .year , ** optdict ))
743
743
else :
744
744
if options .locale :
745
745
cal = LocaleTextCalendar (locale = locale )
You can’t perform that action at this time.
0 commit comments