syrusakbary/promise

Question: JavaScript Code

xnetcat opened this issue · 1 comments

Hi, I AM nre to promise. How I can write thie on python.

return new Promise((resolve, reject) => {
drivelist.list((error, drives) => {
if (error) return reject(err);
resolve(drives);
});
});

Hi dii you find the method to do it? Thank you!