diff --git a/Tools/WinML-Dashbaord/src/python/python.tsx b/Tools/WinML-Dashbaord/src/python/python.tsx index 70babc0b..acdda290 100644 --- a/Tools/WinML-Dashbaord/src/python/python.tsx +++ b/Tools/WinML-Dashbaord/src/python/python.tsx @@ -39,14 +39,12 @@ function unzip(buffer: Buffer, directory: string, success: () => void, errorCall } zipfile!.once('end', success); zipfile!.once('error', errorCallback); - zipfile!.readEntry(); zipfile!.on('entry', entry => { zipfile!.openReadStream(entry, (error, readStream) => { if (error) { errorCallback(error); return; } - readStream!.on('end', zipfile!.readEntry); readStream!.once('error', errorCallback); readStream!.pipe(fs.createWriteStream(path.join(directory, entry.fileName))); }); @@ -63,7 +61,7 @@ export function downloadPython(success: () => void, error: (err: Error) => void) const data: Buffer[] = []; https.get(pythonUrl, response => { response - .on('data', data.push) + .on('data', (x: string) => data.push(Buffer.from(x, 'binary'))) .on('end', () => unzip(Buffer.concat(data), pythonFolder, success, error)) .on('error', error); }); diff --git a/Tools/WinML-Dashbaord/src/view/convert/View.tsx b/Tools/WinML-Dashbaord/src/view/convert/View.tsx index e40ea220..0e0d2c20 100644 --- a/Tools/WinML-Dashbaord/src/view/convert/View.tsx +++ b/Tools/WinML-Dashbaord/src/view/convert/View.tsx @@ -1,4 +1,3 @@ -// tslint:disable:no-console import { DefaultButton } from 'office-ui-fabric-react/lib/Button'; import { ChoiceGroup, IChoiceGroupOption } from 'office-ui-fabric-react/lib/ChoiceGroup'; import { MessageBar, MessageBarType } from 'office-ui-fabric-react/lib/MessageBar'; @@ -60,7 +59,6 @@ export default class ConvertView extends React.Component<{}, IComponentState> { private pythonChooser = () => { const binaries = getPythonBinaries(); - console.log(binaries); const options = binaries.map((key) => key ? { key, text: key } : { key: '__download', text: 'Download a new Python binary to be used exclusively by the WinML Dashboard' }); const onChange = (ev: React.FormEvent, option: IChoiceGroupOption) => { if (option.key === '__download') { @@ -92,6 +90,7 @@ export default class ConvertView extends React.Component<{}, IComponentState> { private convert = () => { // Dialog box // python + // tslint:disable-next-line:no-console console.log('Convert') } }