Skip to content

Commit

Permalink
Update v0.2.0b6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
fxxkrlab committed Jul 28, 2020
1 parent aa65fe6 commit 46f272a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![iCopy Telegram-Bot](https://img.shields.io/badge/iCopy-Telegram%20BOT-red?style=flat-square&logo=appveyor)](https://bbs.jsu.net/c/official-project/icopy/6)
[![Programming Language](https://img.shields.io/badge/LANGUAGE-Python%203.6%2B-success?style=flat-square&logo=appveyor)](https://bbs.jsu.net/c/official-project/icopy/6)
[![Version](https://img.shields.io/badge/Version-0.2.0--beta.6.5-ff69b4?style=flat-square&logo=appveyor)](https://bbs.jsu.net/c/official-project/icopy/6)
[![Version](https://img.shields.io/badge/Version-0.2.0--beta.6.6-ff69b4?style=flat-square&logo=appveyor)](https://bbs.jsu.net/c/official-project/icopy/6)
[![License](https://img.shields.io/github/license/fxxkrlab/iCopy?style=flat-square&logo=appveyor)](https://bbs.jsu.net/c/official-project/icopy/6)
[![DATABASE](https://img.shields.io/badge/DATABASE-MongoDB-brightgreen?style=flat-square&logo=appveyor)](https://github.com/mongodb/mongo)
[![Stars](https://img.shields.io/github/stars/fxxkrlab/iCopy?style=flat-square&logo=appveyor)](https://github.com/fxxkrlab/iCopy)
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# iCopy v0.2 CHANGELOG

## version 0.2.0-beta.6.6

+ Update :
+ Block "googleapiclient.discovery" warning prompt.
+ Deprecated "cache_discovery"

## version 0.2.0-beta.6.5

+ Fixbugs:
Expand Down
4 changes: 3 additions & 1 deletion drive/gdrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

from utils import load
logger = logging.getLogger(__name__)
logging.getLogger('googleapiclient.discovery').setLevel(logging.CRITICAL)

class GoogleDrive:
def __init__(self):
service_account_file = random.choice(glob(load.cfg['general']['sa_path'] + '/*.json'))
Expand All @@ -21,7 +23,7 @@ def __init__(self):
credentials = service_account.Credentials.from_service_account_file(
service_account_file, scopes=scopes)

self.service = discovery.build('drive', 'v3', credentials=credentials)
self.service = discovery.build('drive', 'v3', credentials=credentials, cache_discovery=False)

def drive_list(self):
result = []
Expand Down
2 changes: 1 addition & 1 deletion utils/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from telegram import Bot

### local version
_version = "v0.2.0-beta.6.5"
_version = "v0.2.0-beta.6.6"

_cfgFile_RAW = os.path.abspath(os.path.join("config", "conf.toml"))
cfg = toml.load(_cfgFile_RAW)
Expand Down

0 comments on commit 46f272a

Please sign in to comment.