Skip to content

Commit 28d835a

Browse files
committed
fixed code block sequencing
1 parent fa99305 commit 28d835a

9 files changed

+90
-89
lines changed

compareTwoKeysInCommunity.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
import urllib3
77
import argparse
88

9+
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
10+
if secretsVersion != '':
11+
try:
12+
secrets = __import__(secretsVersion)
13+
print 'Editing Production'
14+
except ImportError:
15+
print 'Editing Stage'
16+
else:
17+
print 'Editing Stage'
18+
919
parser = argparse.ArgumentParser()
1020
parser.add_argument('-1', '--key', help='the first key to be output. optional - if not provided, the script will ask for input')
1121
parser.add_argument('-2', '--key2', help='the second key to be output. optional - if not provided, the script will ask for input')
@@ -27,15 +37,6 @@
2737

2838
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
2939

30-
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
31-
if secretsVersion != '':
32-
try:
33-
secrets = __import__(secretsVersion)
34-
print 'Editing Production'
35-
except ImportError:
36-
print 'Editing Stage'
37-
else:
38-
print 'Editing Stage'
3940

4041
baseURL = secrets.baseURL
4142
email = secrets.email

exportCollectionMetadataToCSV.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
import urllib3
88
import argparse
99

10+
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
11+
if secretsVersion != '':
12+
try:
13+
secrets = __import__(secretsVersion)
14+
print 'Editing Production'
15+
except ImportError:
16+
print 'Editing Stage'
17+
else:
18+
print 'Editing Stage'
19+
1020
#login info kept in secrets.py file
1121
baseURL = secrets.baseURL
1222
email = secrets.email
@@ -25,16 +35,6 @@
2535

2636
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
2737

28-
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
29-
if secretsVersion != '':
30-
try:
31-
secrets = __import__(secretsVersion)
32-
print 'Editing Production'
33-
except ImportError:
34-
print 'Editing Stage'
35-
else:
36-
print 'Editing Stage'
37-
3838
#authentication
3939
startTime = time.time()
4040
data = {'email':email,'password':password}

exportSelectedRecordMetadataToCSV.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
import urllib3
88
import argparse
99

10+
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
11+
if secretsVersion != '':
12+
try:
13+
secrets = __import__(secretsVersion)
14+
print 'Editing Production'
15+
except ImportError:
16+
print 'Editing Stage'
17+
else:
18+
print 'Editing Stage'
19+
1020
#login info kept in secrets.py file
1121
baseURL = secrets.baseURL
1222
email = secrets.email
@@ -25,16 +35,6 @@
2535

2636
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
2737

28-
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
29-
if secretsVersion != '':
30-
try:
31-
secrets = __import__(secretsVersion)
32-
print 'Editing Production'
33-
except ImportError:
34-
print 'Editing Stage'
35-
else:
36-
print 'Editing Stage'
37-
3838
#authentication
3939
startTime = time.time()
4040
data = {'email':email,'password':password}

findDuplicateKeys.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
import urllib3
77
import argparse
88

9+
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
10+
if secretsVersion != '':
11+
try:
12+
secrets = __import__(secretsVersion)
13+
print 'Editing Production'
14+
except ImportError:
15+
print 'Editing Stage'
16+
else:
17+
print 'Editing Stage'
18+
919
parser = argparse.ArgumentParser()
1020
parser.add_argument('-k', '--key', help='the key to be searched. optional - if not provided, the script will ask for input')
1121
args = parser.parse_args()
@@ -17,16 +27,6 @@
1727

1828
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
1929

20-
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
21-
if secretsVersion != '':
22-
try:
23-
secrets = __import__(secretsVersion)
24-
print 'Editing Production'
25-
except ImportError:
26-
print 'Editing Stage'
27-
else:
28-
print 'Editing Stage'
29-
3030
baseURL = secrets.baseURL
3131
email = secrets.email
3232
password = secrets.password

getFacultyNamesFromETDs.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
import urllib3
88
import argparse
99

10+
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
11+
if secretsVersion != '':
12+
try:
13+
secrets = __import__(secretsVersion)
14+
print 'Editing Production'
15+
except ImportError:
16+
print 'Editing Stage'
17+
else:
18+
print 'Editing Stage'
19+
1020
parser = argparse.ArgumentParser()
1121
parser.add_argument('-i', '--handle', help='handle of the community to retreive. optional - if not provided, the script will ask for input')
1222
args = parser.parse_args()
@@ -18,16 +28,6 @@
1828

1929
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
2030

21-
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
22-
if secretsVersion != '':
23-
try:
24-
secrets = __import__(secretsVersion)
25-
print 'Editing Production'
26-
except ImportError:
27-
print 'Editing Stage'
28-
else:
29-
print 'Editing Stage'
30-
3131
baseURL = secrets.baseURL
3232
email = secrets.email
3333
password = secrets.password

getRecordsAndValuesForKey.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
import urllib3
77
import argparse
88

9+
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
10+
if secretsVersion != '':
11+
try:
12+
secrets = __import__(secretsVersion)
13+
print 'Editing Production'
14+
except ImportError:
15+
print 'Editing Stage'
16+
else:
17+
print 'Editing Stage'
18+
919
parser = argparse.ArgumentParser()
1020
parser.add_argument('-k', '--key', help='the key to be searched. optional - if not provided, the script will ask for input')
1121
args = parser.parse_args()
@@ -17,16 +27,6 @@
1727

1828
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
1929

20-
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
21-
if secretsVersion != '':
22-
try:
23-
secrets = __import__(secretsVersion)
24-
print 'Editing Production'
25-
except ImportError:
26-
print 'Editing Stage'
27-
else:
28-
print 'Editing Stage'
29-
3030
baseURL = secrets.baseURL
3131
email = secrets.email
3232
password = secrets.password

getRecordsAndValuesForKeyInCollection.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
import urllib3
77
import argparse
88

9+
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
10+
if secretsVersion != '':
11+
try:
12+
secrets = __import__(secretsVersion)
13+
print 'Editing Production'
14+
except ImportError:
15+
print 'Editing Stage'
16+
else:
17+
print 'Editing Stage'
18+
919
parser = argparse.ArgumentParser()
1020
parser.add_argument('-k', '--key', help='the key to be searched. optional - if not provided, the script will ask for input')
1121
parser.add_argument('-i', '--handle', help='handle of the collection to retreive. optional - if not provided, the script will ask for input')
@@ -22,16 +32,6 @@
2232

2333
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
2434

25-
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
26-
if secretsVersion != '':
27-
try:
28-
secrets = __import__(secretsVersion)
29-
print 'Editing Production'
30-
except ImportError:
31-
print 'Editing Stage'
32-
else:
33-
print 'Editing Stage'
34-
3535
baseURL = secrets.baseURL
3636
email = secrets.email
3737
password = secrets.password

getRecordsWithKeyAndValue.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
import urllib3
77
import argparse
88

9+
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
10+
if secretsVersion != '':
11+
try:
12+
secrets = __import__(secretsVersion)
13+
print 'Editing Production'
14+
except ImportError:
15+
print 'Editing Stage'
16+
else:
17+
print 'Editing Stage'
18+
919
parser = argparse.ArgumentParser()
1020
parser.add_argument('-k', '--key', help='the key to be searched. optional - if not provided, the script will ask for input')
1121
parser.add_argument('-v', '--value', help='the value to be searched. optional - if not provided, the script will ask for input')
@@ -22,16 +32,6 @@
2232

2333
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
2434

25-
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
26-
if secretsVersion != '':
27-
try:
28-
secrets = __import__(secretsVersion)
29-
print 'Editing Production'
30-
except ImportError:
31-
print 'Editing Stage'
32-
else:
33-
print 'Editing Stage'
34-
3535
baseURL = secrets.baseURL
3636
email = secrets.email
3737
password = secrets.password

identifyItemsMissingKeyInCommunity.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
import urllib3
88
import argparse
99

10+
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
11+
if secretsVersion != '':
12+
try:
13+
secrets = __import__(secretsVersion)
14+
print 'Editing Production'
15+
except ImportError:
16+
print 'Editing Stage'
17+
else:
18+
print 'Editing Stage'
19+
1020
parser = argparse.ArgumentParser()
1121
parser.add_argument('-k', '--key', help='the key to be searched. optional - if not provided, the script will ask for input')
1222
parser.add_argument('-i', '--handle', help='handle of the community to retreive. optional - if not provided, the script will ask for input')
@@ -24,16 +34,6 @@
2434

2535
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
2636

27-
secretsVersion = raw_input('To edit production server, enter the name of the secrets file: ')
28-
if secretsVersion != '':
29-
try:
30-
secrets = __import__(secretsVersion)
31-
print 'Editing Production'
32-
except ImportError:
33-
print 'Editing Stage'
34-
else:
35-
print 'Editing Stage'
36-
3737
baseURL = secrets.baseURL
3838
email = secrets.email
3939
password = secrets.password

0 commit comments

Comments
 (0)