Skip to content

Instantly share code, notes, and snippets.

@rubensayshi
Created November 8, 2012 17:47
Show Gist options
  • Save rubensayshi/4040340 to your computer and use it in GitHub Desktop.
Save rubensayshi/4040340 to your computer and use it in GitHub Desktop.
def copy(self, **kwargs):
kwargs['base_image_name'] = kwargs['base_image_name'] or self.base_image_name
kwargs['format'] = kwargs['format'] or self.format
kwargs['size'] = kwargs['size'] or self.size
kwargs['is_temp'] = kwargs['is_temp'] or self.is_temp
newimage = Image(**kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment