Hi Anthony,

Uh... the choice to raise a warning was poor, I admit it. :-)

You can do something like that:

m = ia.get_movie(<invalid movie ID>)
if not m.keys():
    print('this movie does not exist')

Anyway, I have some plans about simplifying / extending IMDbPY.
Who knows if I'll ever have the time to act.

(I'll try to send a mail to imdbpy-devel in the next 2 weeks, about it)

On Fri, Oct 6, 2017 at 6:06 PM, Anthony Pecoraro <ap...@umich.edu> wrote:
> Greetings,
> Is there a way to have the following code return a recognizable error in my
> program? Trying to generate a random movie using a random integer.
> m = ia.get_movie(<invalid movie ID>)
> Thanks,

Davide Alberani <davide.alber...@gmail.com>  [PGP KeyID: 0x3845A3D4AC9B61AD]

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Imdbpy-help mailing list

Reply via email to