Files
PyGithub/src/github/InputGitTreeElement.py
T
Vincent Jacques 8b6d463cd9 Generate code for complex parameters
(+ find bug in Repository.create_commit with parents !)
2012-06-01 19:41:50 +01:00

23 lines
715 B
Python

import GithubObject
class InputGitTreeElement( object ):
def __init__( self, path, mode, type, content = GithubObject.NotSet, sha = GithubObject.NotSet ):
self.__path = path
self.__mode = mode
self.__type = type
self.__content = content
self.__sha = sha
@property
def _identity( self ):
identity = {
"path": self.__path,
"mode": self.__mode,
"type": self.__type,
}
if self.__sha is not GithubObject.NotSet:
identity[ "sha" ] = self.__sha
if self.__content is not GithubObject.NotSet:
identity[ "content" ] = self.__content
return identity