File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 19
19
20
20
dir_path = os .path .dirname (os .path .realpath (__file__ ))
21
21
if os .path .isfile (os .path .join (dir_path , 'VERSION.txt' )):
22
- __version__ = open (os .path .join (dir_path , 'VERSION.txt' )).read ().strip ()
22
+ with open (os .path .join (dir_path , 'VERSION.txt' )) as version_file :
23
+ __version__ = version_file .read ().strip ()
Original file line number Diff line number Diff line change 5
5
6
6
7
7
dir_path = os .path .abspath (os .path .dirname (__file__ ))
8
- readme = io .open (os .path .join (dir_path , 'README.rst' ), encoding = 'utf-8' ).read ()
9
- version = io .open (os .path .join (dir_path , 'VERSION.txt' ),
10
- encoding = 'utf-8' ).read ().strip ()
8
+ with io .open (os .path .join (dir_path , 'README.rst' ), encoding = 'utf-8' ) as readme_file :
9
+ readme = readme_file .read ()
10
+ with io .open (os .path .join (dir_path , 'VERSION.txt' ), encoding = 'utf-8' ) as version_file :
11
+ version = version_file .read ().strip ()
11
12
base_url = 'https://github.com/sendgrid/'
12
13
13
14
copy_file (os .path .join (dir_path , 'VERSION.txt' ),
You can’t perform that action at this time.
0 commit comments