1
Fork 0
mirror of https://github.com/RGBCube/GitHubWrapper synced 2025-05-17 14:35:09 +00:00

Adding files to repos

This commit is contained in:
VarMonke 2022-05-11 11:33:22 +05:30
parent 72bd647c9b
commit 3d49dd9246
5 changed files with 102 additions and 37 deletions

View file

@ -1,7 +1,7 @@
# == exceptions.py ==#
import datetime
from typing import Tuple
from typing import Optional, Tuple
from aiohttp import ClientResponse
@ -94,7 +94,7 @@ class InvalidAuthCombination(ClientException):
"""Raised when the username and token are both provided."""
def __init__(self, msg: str):
#msg = 'The username and token cannot be used together.'
# msg = 'The username and token cannot be used together.'
super().__init__(msg)
@ -162,3 +162,10 @@ class RepositoryAlreadyExists(ResourceAlreadyExists):
def __init__(self):
msg = 'The requested repository already exists.'
super().__init__(msg)
class FileAlreadyExists(ResourceAlreadyExists):
def __init__(self, msg: Optional[str] = None):
if msg is None:
msg = 'The requested file already exists.'
super().__init__(msg)