- with open(flavor_data[1:], 'r') as stream:
- self.flavor_info = yaml.load(stream)
+ if flavor_data[0] == "@": # read from a file
+ with open(flavor_data[1:], 'r') as stream:
+ self.flavor_info = yaml.load(stream)
+ else:
+ self.flavor_info = yaml.load(flavor_data)