MCPcopy Create free account
hub / github.com/arduino/Arduino / pull

Function pull

arduino-core/src/processing/app/i18n/python/pull.py:29–44  ·  view source on GitHub ↗
(trans, lang, fname)

Source from the content-addressed store, hash-verified

27 continue
28
29def pull(trans, lang, fname):
30 count = 0
31 print "Updating %s from Transifex...\n" % fname,
32 sys.stdout.flush()
33 while count < 5:
34 count += 1
35 try:
36 trans.pull(lang, fname)
37 return
38 except requests.exceptions.HTTPError, e:
39 print " *** Retrying %s from Transifex...\n" % fname,
40 time.sleep(3)
41 sys.stdout.flush()
42
43 if count >= 5:
44 raise Exception("Too many retries")
45
46if __name__ == '__main__':
47 main()

Callers 1

mainFunction · 0.85

Calls 3

pullMethod · 0.80
sleepMethod · 0.80
flushMethod · 0.45

Tested by

no test coverage detected