File tree 2 files changed +14
-5
lines changed
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 21
21
from boto .ec2 .connection import EC2Connection
22
22
23
23
# My libraries
24
- import ec2_classes
24
+ try :
25
+ import ec2 .ec2_classes as ec2_classes
26
+ except ImportError :
27
+ import ec2_classes
25
28
26
29
#### Constants and globals
27
30
Original file line number Diff line number Diff line change 2
2
ec2_classes.py
3
3
~~~~~~~~~~~~~~
4
4
5
- Defines the Cluster and Instance classes used by `ec2.py`. These
6
- classes are put in a separate module because `ec2.py` stores instances
7
- of these classes by pickling (through shelves), and ...
8
-
5
+ Defines the Cluster and Instance classes used by `ec2.py`.
9
6
"""
10
7
8
+ # Why are these classes stored in a separate module from ec2.py?
9
+ #
10
+ # These classes are put in a separate module because ec2.py stores
11
+ # instances of these classes by pickling (through shelves). Pickling
12
+ # classes defined within ec2.py creates namespace problems that can be
13
+ # solved by putting the class definitions into a separate module. See:
14
+ #
15
+ # http://stackoverflow.com/questions/3614379/attributeerror-when-unpickling-an-object
16
+
11
17
#### Cluster and Instance classes
12
18
13
19
class Cluster ():
You can’t perform that action at this time.
0 commit comments