Code Duplication    Length = 26-26 lines in 2 locations

gitfollow/gitfollow.py 1 location

@@ 444-469 (lines=26) @@
441
            print(user+" Followed")
442
        time.sleep(3)
443
444
if __name__=="__main__":
445
    try:
446
        password=""
447
        time_1=time.perf_counter()
448
        username=input("Please Enter Your Github Username : ")
449
        (list_1,list_2)=list_maker(username)
450
        dif_lists=dif(list_1,list_2,username)
451
        print(dif_lists)
452
        time_2=time.perf_counter()
453
        dif_time=str(time_2-time_1)
454
        print("Data Generated In "+time_convert(dif_time)+" sec")
455
        print("Log Files Are Ready --> " + os.getcwd())
456
        input_data=input("Unfollow Non-follower?Yes[y],No[n] ")
457
        if input_data.upper()=="Y":
458
            password=input("Please Enter Password : ")
459
            print("Processing ... ")
460
            unfollow(username,password,dif_lists[0])
461
        input_data = input("Follow Non-following?Yes[y],No[n] ")
462
        if input_data.upper()=="Y":
463
            if len(password)<1:
464
                password=input("Please Enter Password : ")
465
            print("Processing ... ")
466
            follow(username,password,dif_lists[1])
467
        gc.collect()
468
    except Exception as ex:
469
        error_log(str(ex))
470
471
472

gitfollow/__main__.py 1 location

@@ 4-29 (lines=26) @@
1
from .gitfollow import *
2
import os
3
import gc
4
if __name__=="__main__":
5
    try:
6
        password=""
7
        time_1=time.perf_counter()
8
        username=input("Please Enter Your Github Username : ")
9
        (list_1,list_2)=list_maker(username)
10
        dif_lists=dif(list_1,list_2,username)
11
        print(dif_lists)
12
        time_2=time.perf_counter()
13
        dif_time=str(time_2-time_1)
14
        print("Data Generated In "+time_convert(dif_time)+" sec")
15
        print("Log Files Are Ready --> " + os.getcwd())
16
        input_data=input("Unfollow Non-follower?Yes[y],No[n] ")
17
        if input_data.upper()=="Y":
18
            password=input("Please Enter Password : ")
19
            print("Processing ... ")
20
            unfollow(username,password,dif_lists[0])
21
        input_data = input("Follow Non-following?Yes[y],No[n] ")
22
        if input_data.upper()=="Y":
23
            if len(password)<1:
24
                password=input("Please Enter Password : ")
25
            print("Processing ... ")
26
            follow(username,password,dif_lists[0])
27
        gc.collect()
28
    except Exception as ex:
29
        error_log(str(ex))
30
31
32