Use pkg_resources to keep the package zip-safe (#1308)
This commit is contained in:
		
							parent
							
								
									eccc8f97f8
								
							
						
					
					
						commit
						6e199d35b3
					
				| @ -4,9 +4,9 @@ import copy | |||||||
| import itertools | import itertools | ||||||
| import ipaddress | import ipaddress | ||||||
| import json | import json | ||||||
| import os |  | ||||||
| import re | import re | ||||||
| import six | import six | ||||||
|  | from pkg_resources import resource_filename | ||||||
| 
 | 
 | ||||||
| import boto.ec2 | import boto.ec2 | ||||||
| 
 | 
 | ||||||
| @ -113,8 +113,8 @@ from .utils import ( | |||||||
|     tag_filter_matches, |     tag_filter_matches, | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| RESOURCES_DIR = os.path.join(os.path.dirname(__file__), 'resources') | RES_FILE = resource_filename(__name__, 'resources/instance_types.json') | ||||||
| INSTANCE_TYPES = json.load(open(os.path.join(RESOURCES_DIR, 'instance_types.json'), 'r')) | INSTANCE_TYPES = json.load(open(RES_FILE, 'r')) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def utc_date_and_time(): | def utc_date_and_time(): | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user