This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gc | |
closed = False | |
def generator(iterable, held=None): | |
global closed | |
try: | |
for chunk in iterable: | |
yield chunk | |
except GeneratorExit: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gc | |
closed = False | |
def generator(iterable): | |
global closed | |
try: | |
for chunk in iterable: | |
yield chunk | |
except GeneratorExit: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "${SAUCE_USERNAME}" ] || [ -z "${SAUCE_ACCESS_KEY}" ]; then | |
echo "This script can't run without your Sauce credentials" | |
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables" | |
echo "export SAUCE_USERNAME=ur-username" | |
echo "export SAUCE_ACCESS_KEY=ur-access-key" | |
exit 1 | |
fi | |
SAUCE_TMP_DIR="$(mktemp -d -t sc.XXXX)" |