Code Duplication    Length = 13-13 lines in 2 locations

scripts/monthly-report.gmp.py 1 location

@@ 113-125 (lines=13) @@
110
    )
111
112
113
def main(gmp, args):
114
    # pylint: disable=undefined-variable
115
116
    check_args(args)
117
118
    month = int(args.script[1])
119
    year = int(args.script[2])
120
    from_date = date(year, month, 1)
121
    to_date = from_date + timedelta(days=31)
122
    # To have the first day in month
123
    to_date = to_date.replace(day=1)
124
125
    print_reports(gmp, args, from_date, to_date)
126
127
128
if __name__ == '__gmp__':

scripts/monthly-report2.gmp.py 1 location

@@ 106-118 (lines=13) @@
103
    )
104
105
106
def main(gmp, args):
107
    # pylint: disable=undefined-variable
108
109
    check_args(args)
110
111
    month = int(args.script[1])
112
    year = int(args.script[2])
113
    from_date = date(year, month, 1)
114
    to_date = from_date + timedelta(days=31)
115
    # To have the first day in month
116
    to_date = to_date.replace(day=1)
117
118
    print_reports(gmp, from_date, to_date)
119
120
121
if __name__ == '__gmp__':