pymensago/keycard.py
def save(self, path : str, clobber = False) -> RetVal:
		'''Saves to the specified path, forcing CRLF line endings to prevent any weird behavior 
		caused by line endings invalidating signatures.'''

		if not path:
			return RetVal(ErrBadValue, 'path may not be empty')
		
		if os.path.exists(path) and not clobber:
			return RetVal(ErrExists)
		
		try:
			with open(path, 'wb') as f:
				f.write(self.make_bytestring(-1))
		
		except Exception as e:
			return RetVal.wrap_exception(e)

		return RetVal()
Saves to the specified path, forcing CRLF line endings to prevent any weird behavior 
		caused by line endings invalidating signatures.
Saves to the specified path, forcing CRLF line endings to prevent any weird behavior
caused by line endings invalidating signatures.
Saves to the specified path forcing CRLF line endings to prevent any weird behavior caused by line endings invalidating signatures .
def save(self, path : str, clobber = False) -> RetVal:
		if not path:
			return RetVal(ErrBadValue, 'path may not be empty')
		if os.path.exists(path) and not clobber:
			return RetVal(ErrExists)
		try:
			with open(path, 'wb') as f:
				f.write(self.make_bytestring(-1))
		except Exception as e:
			return RetVal.wrap_exception(e)
		return RetVal()
def save ( self , path : str , clobber = False ) -> RetVal : if not path : return RetVal ( ErrBadValue , 'path may not be empty' ) if os . path . exists ( path ) and not clobber : return RetVal ( ErrExists ) try : with open ( path , 'wb' ) as f : f . write ( self . make_bytestring ( - 1 ) ) except Exception as e : return RetVal . wrap_exception ( e ) return RetVal ( )
Saves to the specified path, forcing CRLF line endings to prevent any weird behavior
caused by line endings invalidating signatures.
Saves to the specified path forcing CRLF line endings to prevent any weird behavior caused by line endings invalidating signatures .
'''Saves to the specified path, forcing CRLF line endings to prevent any weird behavior 
		caused by line endings invalidating signatures.'''
self
path
str
clobber